﻿using SqlSugar;

namespace ProjectScheduling_web.model
{
    /// <summary>
    /// 发票主表
    /// </summary>
    [SugarTable("Invoice")]
    public class Invoice : BClass
    {
        /// <summary>
        /// 开票名称
        /// </summary>
        public string? Name { get; set; }
        /// <summary>
        /// 开票日期
        /// </summary>
        public DateTime InvoiceDate { get; set; }
        /// <summary>
        /// 客户Id
        /// </summary>
        public int CustomerId { get; set; }
        /// <summary>
        /// 客户名称
        /// </summary>
        public string? CustomerName { get; set; }
        /// <summary>
        /// 发票类型
        /// </summary>
        public int InvoiceTypeId { get; set; }
        /// <summary>
        /// 发票类型名称
        /// </summary>
        public string? InvoiceTypeName { get; set; }
        /// <summary>
        /// 开票金额
        /// </summary>
        public decimal Money { get; set; }
        /// <summary>
        /// 开票人
        /// </summary>
        public int TickerId { get; set; }
        /// <summary>
        /// 开票人名称
        /// </summary>
        public string? TickerName { get;set; }
        /// <summary>
        /// 归属部门
        /// </summary>
        public int OrgId { get; set; }
        /// <summary>
        /// 归属部门名称
        /// </summary>
        public string? OrgName { get; set; }
        /// <summary>
        /// 纳税人识别号（税号）
        /// </summary>
        public string? TaxNumber { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 创建人ID
        /// </summary>
        public int CreaterId { get; set; }
        /// <summary>
        /// 创建人名称
        /// </summary>
        public string? CreaterName { get;set;}
        /// <summary>
        /// 商品信息
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public List<InvoiceProduct>? Products { get; set; }
        /// <summary>
        /// 附件信息
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public List<FileMsg>? Files { get; set; }
    }
}
